@import "../global/global";

.ring-progress-bar {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
  height: $ring-unit/2;
  margin-bottom: $ring-unit/2;
  max-width: 36*$ring-unit;
  overflow: hidden;
  position: relative;
  z-index: 1; // Required to see border-radius on animated background

  &_light {
    background-color: rgba(255, 255, 255, 0.3);
  }
}


.ring-progress-bar_global {
  background: transparent;
  max-width: none;
  position: absolute;
  top: 0;
  width: 100%;
}

.ring-progress-bar__i {
  border-radius: 2px;
  background-color: $ring-blue-color;
  color: #FFF;
  float: left;
  height: 100%;
  line-height: $ring-unit/2;
  transition: width .6s ease;
  text-align: center;
  width: 0;

  &:after {
    animation: progress-bar 2500ms linear infinite;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.6), rgba(0, 0, 0, 0));
    background-repeat: no-repeat;
    bottom: 0;
    content: '';
    left: 0;
    position: absolute;
    right: 0;
    top: 0;

    .ring-progress-bar_light & {
      background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0));
    }
  }
}

@keyframes progress-bar {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}
